<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> 
<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>

<html:html>
<head>
	<title></title>
	<script type="text/javascript">
		
		function set(target)
		{
			document.forms[0].action.value=target;
		}
		
	</script>
</head>
<body>
	<table border="1">
  		<tr>
    		<th>Accept</th>
    		<th>Company Name</th>
    		<th>Website</th>
		</tr>
		<html:form action="RegCompanyAction.do" type="">			
		
			<logic:iterate id="company" name="PendingRequestsForm" property="pendingCompanies">
		      
		      <tr>		      
			    <td><html:checkbox name="company" property="regIsApproved"/></td>
			    <td><bean:write name="company" property="CName"/></td>
			    <td><bean:write name="company" property="regWesite"/></td>
			  </tr>
			  	
		    </logic:iterate>
		    <input type="hidden" name="action"/>
		    <tr>   
			    <td><html:submit value="Accept Request" onclick="set('accept');"/></td>
			    <td><html:submit value="Reject Request" onclick="set('reject');"/></td>
			</tr>
		</html:form>
</table>
    
</body>
</html:html>

